package com.sun.common.core.excel.model;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * <p> TODO
 *
 * @author luxiaojin
 * @version 1.0.0
 * @date 2023/4/24 15:01
 **/
@Data
@AllArgsConstructor
public class ErrorDataValid {
    private Integer rowIndex;
    private Integer columnIndex;
    private String message;
    private String field;
    private Object value;

    public ExportExcelErrorMessage errorMessage() {
        final String messageFormat = "第%s行,第%s列,该数值不符合要求[%s],请修改导入数据对应位置!";
        return new ExportExcelErrorMessage(String.format(messageFormat, rowIndex, columnIndex, message));
    }
}
